/**
 * 扫尾
 */

import { Context } from "../class/Context";
import { Hurt } from "../class/Hurt";
import { Method } from "../class/Method";

export class SaoWei extends Method {
    static methodName = "扫尾"
    public CD: number = 30E3;
    public describe: string = "对目标敌人造成 500 + 10%(HP) 的生命值 的物理伤害，并附加 500 点法术伤害。";
    invoke(context: Context): void {
        const itId = context.nextParam()
        const it = this.masterRole.game.getRole(itId);

        // 造成的物理伤害
        const PA = 500 + Math.floor(this.masterRole.getHP() * 0.1);
        // 让对方承受伤害
        it.onHurt(this.masterRole, new Hurt(PA, 500, 0))
    }

}